const exress = require("express")
// const mysql = require("./db")
const {graphqlHTTP} = require('express-graphql');
const GraphQLSchema = require('./schema/default.js');

const app = exress()

// 配置express中间件
app.use('/graphql', graphqlHTTP({
    schema: GraphQLSchema, // MyGraphQLSchema待定
    graphiql: true, // 开发环境打开调试面板，生产的时候可以关闭
  }),
);

app.listen(3000, () => {
  console.log("服务已启动: localhost:3000");
})
